package haonan3344.webcheater;

import haonan3344.webcheater.core.ProxyList;
import haonan3344.webcheater.getProxyLists.GetProxyBase;
import haonan3344.webcheater.getProxyLists.GetProxyFromFile;
import haonan3344.webcheater.getProxyLists.GetProxyFromHidemyass;
import haonan3344.webcheater.getProxyLists.GetProxyFromProxyNova;
import haonan3344.webcheater.validate.GoldRusher;
import haonan3344.webcheater.validate.Validator;
import haonan3344.localbbs.conf.*;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Settings.init();
		
		//getProxys();
		//validateProxys();
		
		getGolds();
	}
	
	public static void  getProxys(){
		
		ProxyList pl = new ProxyList();
		
		pl.mergeToMe(new GetProxyFromFile("D:/temp/pl.txt").getProxyList());

		pl.mergeToMe(new GetProxyFromHidemyass().getProxyList());
		pl.mergeToMe(new GetProxyFromProxyNova().getProxyList());
		pl.saveToFile("D:/temp/pl.txt");
	}
	
public static void  validateProxys(){
		
		ProxyList pl = new ProxyList();
		
		pl.mergeToMe(new GetProxyFromFile("D:/temp/pl.txt").getProxyList());

		ProxyList out = (new Validator()).validate(pl);
		out.saveToFile("D:/temp/pl-out.txt");
	}
	
public static void  getGolds(){
	
	ProxyList pl = new ProxyList();
	
	pl.mergeToMe(new GetProxyFromFile("D:/temp/pl-out.txt").getProxyList());

	ProxyList out = (new GoldRusher()).rush(pl);
	out.saveToFile("D:/temp/pl-out-2.txt");
}
}
